package cc.idoone.handlermapping.subdomain;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @auther hemj
 * @since 2018/5/9
 */
@RestController
@SubdomainMapping(value = "subdomain", tld = ".mydomain.com")
class MyController1 {
	// Code here will be executed only on address match:
	// subdomain.mydomain.com

	@RequestMapping("/index.html")
	public String index_www(Map<Object, String> map) {
		// on www.domain.com
		// where ".domain.com" is defined in SubdomainMapping.java
		return "subdomain.mydomain.com";
	}

}